<{include file="layouts/header.htm" index='index'}>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
    <!--轮播图-->
	<div class="swiper-container banner">
	    <div class="swiper-wrapper">
	        <{foreach from=$bannerad item=banner}>
          	   <div class="swiper-slide"><a href="<{$banner->link}>"><img src="<{$banner->content}>"/></a></div>
            <{/foreach}>
	    </div>
	    <!-- 如果需要分页器 -->
	    <div class="swiper-pagination"></div>
	    
	    <!-- 如果需要导航按钮 -->
	    <div class="banner-prev hidden-xs"></div>
	    <div class="banner-next hidden-xs"></div>
	</div>
    <!--轮播图-->
    <div class="container">
    	<div class="row">
    		

    	<!--联系我们-->
    	<div class="pro_box">
    		
    		<div class="detail_txt" style="border: none;">
    			<div class="name">
    				联系我们
    			</div>
    			<div class="contact_txt">
	    			<p><{$config->site_title}></p>
		    		<p>地址：<{$config->contact_addr}></p>
		    		<p>电话：<{$config->tel}></p>
		    		<p>邮箱：<{$config->admin_email}></p>
    			</div>
    			<div class="contact_map">
        	<div id="container">
    </div>
           <input id="lng" type="hidden" runat="server" />
    <input id="lat" type="hidden" runat="server" /> 
    <script type="text/javascript">

        function getbiaoji() {
            var lng = document.getElementByIdx_x("lng").value;
            var lat = document.getElementByIdx_x("lat").value;

            var map = new BMap.Map("container");
            var point = new BMap.Point(lng, lat);
            var marker = new BMap.Marker(point);
            var opts = {
                width: 250,     // 信息窗口宽度 
                height: 100,     // 信息窗口高度 
                title: "<B><{$config->site_title}></b>"  // 信息窗口标题 
            }
            var infoWindow = new BMap.InfoWindow("地址：<{$config->contact_addr}>" + lng + lat, opts);  // 创建信息窗口对象


            marker.enableDragging(); //启用拖拽
            map.addControl(new BMap.NavigationControl()); //左上角控件
            map.enableScrollWheelZoom(); //滚动放大
            map.enableKeyboard(); //键盘放大

            map.centerAndZoom(point, 17); //绘制地图
            map.addOverlay(marker); //标记地图

            map.openInfoWindow(infoWindow, map.getCenter());
        }

        function loand() {
            var map = new BMap.Map("container");
            var point = new BMap.Point(104.075249,30.540922); //默认中心点
            var marker = new BMap.Marker(point);
            var opts = {
                width: 250,     // 信息窗口宽度 
                height: 100,     // 信息窗口高度 
                title: "<B><{$config->site_title}></B>"  // 信息窗口标题 
            }
            var infoWindow = new BMap.InfoWindow("地址：<{$config->contact_addr}>", opts);  // 创建信息窗口对象


            marker.enableDragging(); //启用拖拽
            marker.addEventListener("dragend", function (e) {
                point = new BMap.Point(e.point.lng, e.point.lat); //标记坐标（拖拽以后的坐标）
                marker = new BMap.Marker(point);

                document.getElementByIdx_x("lng").value = e.point.lng;
                document.getElementByIdx_x("lat").value = e.point.lat;
                infoWindow = new BMap.InfoWindow("当前位置<br />经度：" + e.point.lng + "<br />纬度：" + e.point.lat, opts);

                map.openInfoWindow(infoWindow, point);
            })

            map.addControl(new BMap.NavigationControl()); //左上角控件
            map.enableScrollWheelZoom(); //滚动放大
            map.enableKeyboard(); //键盘放大

            map.centerAndZoom(point, 17); //绘制地图
            map.addOverlay(marker); //标记地图

            map.openInfoWindow(infoWindow, map.getCenter());      // 打开信息窗口     
        }
        
    </script>
        </div>
    		</div>
    	</div>
    	<!--联系我们-->
    	
    	
    	</div>
    </div>
<{include file="layouts/footer.htm"}>
<script>
   	$(document).ready(function () {
   		loand();
   		$(".check_box").CheckBox();
   		var galleryTop = new Swiper('.gallery-top', {
	       loop: true,
		    autoplay:3000,
		    grabCursor: true,
		    paginationClickable: true,
		    calculateHeight : true,
		    // 如果需要分页器
		    pagination: '.swiper-pagination2',
		    paginationClickable :true,
	    });
   	})
    
   </script>